home *** CD-ROM | disk | FTP | other *** search
/ DarkBASIC - The Ultimate 3D Game Creator / PCactive 8 CD1 - DarkBasic.iso / SOFTWARE / DEMOS / DarkForge2000 / snippets_vol1 / snip_wiresphere.dba < prev    next >
Encoding:
Text File  |  2000-08-05  |  704 b   |  41 lines

  1. `    ------------------------------------------------------------------------
  2. `    Shaded Wireframe Sphere                     DarkForge Snippet (6/8/2000)
  3. `    ------------------------------------------------------------------------
  4. `
  5. `    A pulsating wireframe shaded sphere
  6.  
  7. sync rate 0
  8. sync on
  9. hide mouse
  10.  
  11. make object sphere 1,50
  12. color object 1,rgb(150,150,100)
  13. color backdrop rgb(0,40,0)
  14. set object 1,0,1,1
  15.  
  16. reverse=0 : x=50 : y=50
  17.  
  18. do
  19.  
  20.     if reverse=0
  21.         inc x : dec y
  22.         if x=60 then reverse=1
  23.     else
  24.         dec x : inc y
  25.         if x=50 then reverse=0
  26.     endif
  27.  
  28.     scale object 1,x,y,x
  29.  
  30.     xrotate object 1,a
  31.     yrotate object 1,a
  32.  
  33.     zrotate camera a
  34.  
  35.     inc a : if a=360 then a=0
  36.  
  37.     sync
  38.  
  39. loop
  40.  
  41.